import Vue from 'vue'
import VueRouter from 'vue-router'
import movie from '../views/home/movie.vue'

Vue.use(VueRouter)

const routes = [
  {"path":"/",redirect:"/hot"},
  {
    path: '/',
    name: 'movie',
    component: movie,
    children: [
      { path: "hot", name: "hot", component: () => import(/* webpackChunkName: "hot" */ '../views/home/hot.vue') },
      { path: "cinema", name: "cinema", component: () => import(/* webpackChunkName: "cinema" */ '../views/home/cinema.vue') },
      { path: "wait", name: "wait", component: () => import(/* webpackChunkName: "wait" */ '../views/home/wait.vue') },
      { path: "classic", name: "classic", component: () => import(/* webpackChunkName: "classic" */ '../views/home/classic.vue') }
    ]
  },
  {
    path: '/video',
    name: 'video',
    component: () => import(/* webpackChunkName: "about" */ '../views/video.vue')
  },
  {
    path: '/shortvideo',
    name: 'shortvideo',
    component: () => import(/* webpackChunkName: "about" */ '../views/shortvideo.vue')
  },
  {
    path: '/show',
    name: 'show',
    component: () => import(/* webpackChunkName: "about" */ '../views/show.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../views/login.vue')
  },
  {
    path:'/item/:id',
    name:'item',
    component: () => import(/* webpackChunkName: "about" */ '../views/item.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
